package com.yanqu.road.server.timer.activity;

import com.yanqu.road.server.manager.activity.CrossUnionActivityTaskMgr;
import com.yanqu.road.utils.date.DateHelper;
import com.yanqu.road.utils.executor.GeneralTask;

public class CrossUnionActivityTaskTask extends GeneralTask {

    private long removeTime = 0L;

    @Override
    public void doRun() {

        long now = System.currentTimeMillis();

        // 同步数据
        CrossUnionActivityTaskMgr.syncData();

        // 清空旧数据
        if (now > removeTime + DateHelper.HOUR_MILLIONS) {
            CrossUnionActivityTaskMgr.removeOldData();
            removeTime = now;
        }

    }
}
